﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="HausaMathTermdev._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

 <a href="../rss.aspx"><img style="height: 40px; width: 40px; border: none;" alt="http://www.iconspedia.com/icon/newspaper-rss-feed-1430.html" src="image/rss.png" /></a>

 <p> most recent post </p>
    <asp:GridView ID="GridView4" runat="server" DataSourceID="SqlDataSource5" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    DataKeyNames="TermID" Width= "100%">
        <Columns>
            <asp:BoundField DataField="Hausaterm" HeaderText="Hausa Term" 
                SortExpression="Hausaterm" >
            <ControlStyle CssClass="fontsize" Font-Bold="False" />
            <HeaderStyle CssClass="fontsize" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="TermID" 
                DataNavigateUrlFormatString="details.aspx?TermID={0}" 
                DataTextField="Mathterm" HeaderText="Math Term" SortExpression="Mathterm" />
            <asp:ImageField DataAlternateTextField="PictureSymbol" 
                DataImageUrlField="PictureSymbol" DataImageUrlFormatString="/image/{0}" 
                HeaderText=" Thumbnail" SortExpression="PictureSymbol">
                <ControlStyle CssClass="Thumbnail" />
                <ItemStyle CssClass="Thumbnail" />
            </asp:ImageField>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
        
        SelectCommand="SELECT top 3  [TermID], [Mathterm], [Hausaterm], [Definition], [PictureSymbol], [SiteAdd], [Remark], [Category], [Author], [DDate] FROM [Terms] order by DDate desc ">
    </asp:SqlDataSource>

    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource3">
        <Series>
            <asp:Series Name="Series1" YValuesPerPoint="2" XValueMember="Mathterm" 
                YValueMembers="LikeCount" ChartType="Bar">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
    SelectCommand="SELECT [LikeCount], [Mathterm], [TermID] FROM [CountLikes]"></asp:SqlDataSource>

    <br />
    <br />
    <p> Complete List</p>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    DataKeyNames="TermID" Width= "100%">
        <Columns>
            <asp:BoundField DataField="Hausaterm" HeaderText="Hausa Term" 
                SortExpression="Hausaterm" >
            <ControlStyle CssClass="fontsize" Font-Bold="False" />
            <HeaderStyle CssClass="fontsize" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="TermID" 
                DataNavigateUrlFormatString="details.aspx?TermID={0}" 
                DataTextField="Mathterm" HeaderText="Math Term" SortExpression="Mathterm" />
            <asp:ImageField DataAlternateTextField="PictureSymbol" 
                DataImageUrlField="PictureSymbol" DataImageUrlFormatString="/image/{0}" 
                HeaderText=" Thumbnail" SortExpression="PictureSymbol">
                <ControlStyle CssClass="Thumbnail" />
                <ItemStyle CssClass="Thumbnail" />
            </asp:ImageField>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
        
        SelectCommand="SELECT [TermID], [Mathterm], [Hausaterm], [Definition], [PictureSymbol], [SiteAdd], [Remark], [Category], [Author], [DDate] FROM [Terms] ">
    </asp:SqlDataSource>
    </asp:Content>
